<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MYMSGRO</title>
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<link rel="stylesheet" type="text/css" href="css/meniu.css"/>
</head>
<body>
<div id="titleDiv">
	<div id="div0"><img src="img/msg.jpg"/></div>
    <div id="div1" style="clear:right;">    	
    	<div style="height:70%; position:inherit; ">SMRCS </div>
        <div style="height:30%;">Sistem de Management a resurselor unei companii software </div> 
     </div>
     <div style="float:right; vertical-align:middle;">
    	<div id="div2"><img src="img/head.png"/>admin </div>
    	<div id="div3">

    	Departament 
    
   		 </div>
    	<div id="div4"><a href="www.google.com"><img src="img/poweroff.png"/>Logout</a></div>
      </div>
</div>

<div id="content" style="" >
	<div id="contentLeft">
	 <ul id="leftMenu">
      <li><a href="#">Edit Reports</a></li>
     </ul>
    </div>
	<div id="contenRight">
		<h:form>
		<h:dataTable id="dt" value="#{reportTableData.reports}" var="rep"  border="2">
		<h:column rendered="#{reportTableData.editable}">
			<f:facet name="header">
				<h:outputText value="Delete" />
			</f:facet>
			<h:selectBooleanCheckbox for="header"
				value="#{rep.markedForDeletion}">
			</h:selectBooleanCheckbox>
		</h:column>

		<h:column>
			<f:facet name="header">
			
					<h:outputText value="Report Name" />
				
			</f:facet>
			<h:outputText value="#{rep.reportDTO.name}" />
		</h:column>

		<h:column>
			<f:facet name="header">
				
					<h:outputText value="Report Date" />
				
			</f:facet>
			<h:outputText value="#{rep.reportDTO.date}" >
			 	<f:convertDateTime pattern="dd.MM.yyyy" />
			</h:outputText>
		</h:column> 
		<h:column>
			
			<h:commandButton id="exp" value="Delete"
			action="#{reportTableData.delete(rep.reportDTO.id)}">
			</h:commandButton>
			
		</h:column>		
		</h:dataTable><br/>

			<h:outputText value="Give folder name for export." ></h:outputText><br/>
			<h:inputText value="#{exportBean.folder}"/>
			
		
			<h:commandButton id="exp" value="Export"
			action="#{exportBean.exportData}">
			<f:ajax execute="exp" render="error"></f:ajax>
			</h:commandButton>
			<h:outputText id="error" value="#{exportBean.error}"></h:outputText>
</h:form>
    </div> 
</div>
</body>
</html>